package com.caochenlei.controller;

import com.caochenlei.pojo.Product;
import com.caochenlei.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ProductController {
    @Autowired
    private ProductService productService;

    @RequestMapping("/provider/product/findAll")
    public List<Product> findAll() {
        return productService.findAll();
    }
}
